/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

body {
  background: none;
}

/* Panel styles */

.panel {
  /* hide the extra margin space that the panel resizer now wants to show */
  overflow: hidden;
}

/* Notifications displayed over tabs */

.panel .messages {
  margin: 0;
}

.panel .messages .alert {
  margin: 0;
}

/* Tabs and tab selection buttons */

.tab-view-container {
  background-image: url("../img/beta-ribbon.svg#beta-ribbon");
  background-size: 36px 36px;
  background-repeat: no-repeat;
}

.tab-view {
  display: flex;
  flex-direction: row;
  padding: 10px;
  border-bottom: 1px solid #ccc;
  color: #000;
  border-top-right-radius: 2px;
  border-top-left-radius: 2px;
  list-style: none;
}

.tab-view > li {
  flex: 1;
  text-align: center;
  color: #ccc;
  border-right: 1px solid #ccc;
  padding: 0 10px;
  height: 16px;
  cursor: pointer;
  background-repeat: no-repeat;
  background-size: 16px 16px;
  background-position: center;
}

.tab-view > li:last-child {
  border-right-style: none;
}

.tab-view > li[data-tab-name="call"] {
  background-image: url("../img/icons-16x16.svg#precall");
}

.tab-view > li[data-tab-name="call"]:hover {
  background-image: url("../img/icons-16x16.svg#precall-hover");
}

.tab-view > li[data-tab-name="call"].selected {
  background-image: url("../img/icons-16x16.svg#precall-active");
}

.tab-view > li[data-tab-name="contacts"] {
  background-image: url("../img/icons-16x16.svg#contacts");
}

.tab-view > li[data-tab-name="contacts"]:hover {
  background-image: url("../img/icons-16x16.svg#contacts-hover");
}

.tab-view > li[data-tab-name="contacts"].selected {
  background-image: url("../img/icons-16x16.svg#contacts-active");
}

.tab {
  display: none;
}

.tab.selected {
  display: block;
}

/* Content area and input fields */

.content-area {
  padding: 14px;
}

.content-area header {
  font-weight: 700;
  -moz-padding-start: 20px;
}

.tab-view + .tab .content-area header {
  /* The header shouldn't be indented if the tabs are present. */
  -moz-padding-start: 0;
}

.content-area label {
  display: block;
  width: 100%;
  margin-top: 10px;
  font-size: 10px;
  color: #777;
}

.content-area input {
  display: block;
  width: 100%;
  outline: none;
  border-radius: 2px;
  margin: 5px 0;
  border: 1px solid #ccc;
  height: 24px;
  padding: 0 10px;
}

.content-area input:invalid {
  box-shadow: none;
}

.content-area input:not(.pristine):invalid {
  border-color: #d74345;
  box-shadow: 0 0 4px #c43c3e;
}

/* Buttons */

.button-group {
  display: flex;
  flex-direction: row;
  width: 100%;
}

.button-group > .button {
  flex: 1;
  margin: 0 7px;
}

.button-group > .button:first-child {
  -moz-margin-start: 0;
}

.button-group > .button:last-child {
  -moz-margin-end: 0;
}

.button {
  padding: 2px 5px;
  background-color: #fbfbfb;
  color: #333;
  border: 1px solid #c1c1c1;
  border-radius: 2px;
  height: 26px;
  font-size: 12px;
}

.button:hover {
  background-color: #ebebeb;
}

.button:hover:active {
  background-color: #ccc;
  color: #111;
}

.button.button-accept {
  background-color: #5bc0a4;
  border-color: #5bc0a4;
  color: #fff;
}

.button.button-accept:hover {
  background-color: #47b396;
  border-color: #47b396;
  color: #fff;
}

.button.button-accept:hover:active {
  background-color: #3aa689;
  border-color: #3aa689;
  color: #fff;
}

/* Dropdown menu */

.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: -28px;
  left: 0;
  background-color: #fdfdfd;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
  list-style: none;
  padding: 5px;
  border-radius: 2px;
}

body[dir=rtl] .dropdown-menu-item {
  left: auto;
  right: 10px;
}

.dropdown-menu-item {
  text-align: start;
  margin: .3em 0;
  padding: .2em .5em;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 1em;
  white-space: nowrap;
}

.dropdown-menu-item:hover {
  border: 1px solid #ccc;
  background-color: #eee;
}

/* Share tab */

.generate-url input {
  margin: 14px 0;
  outline: 0;
  border: 1px solid #ccc; /* Overriding background style for a text input (see
                             below) resets its borders to a weird beveled style;
                             defining a default 1px border solves the issue. */
  border-radius: 2px;
  height: 26px;
  padding: 0 10px;
  font-size: 1em;
}

.generate-url input.pending {
  background-image: url(../img/loading-icon.gif);
  background-repeat: no-repeat;
  background-position: right;
}

.generate-url .button {
  background-color: #0096dd;
  border-color: #0096dd;
  color: #fff;
}

.generate-url .button:hover {
  background-color: #008acb;
  border-color: #008acb;
  color: #fff;
}

.terms-service {
  color: #888;
  text-align: center;
  font-size: .9em;
}

.terms-service a {
  color: #00caee;
}

/* DnD menu */

.dnd-status {
  border: 1px solid transparent;
  padding: 2px 4px;
  font-size: .9em;
  cursor: pointer;
  border-radius: 3px;
}

.dnd-status:hover {
  border: 1px solid #DDD;
  background-color: #f1f1f1;
}

/* Status badges -- Available/Unavailable */

.status {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 5px;
  border-radius: 50%;
}

.status-available {
  background-color: #6cb23e;
}

.status-dnd {
  border: 1px solid #888;
}

/* Sign in/up link */

.signin-link {
  flex: 2 1 auto;
  margin-top: 14px;
  border-right: 1px solid #aaa;
  padding-right: 1em;
  margin-right: 1em;
  text-align: right;
}

.signin-link a {
  font-size: .9em;
  text-decoration: none;
  color: #888;
}

/* Settings (gear) menu */

.button-settings {
  display: inline-block;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: none;
  background-color: #a5a;
  color: #fff;
  text-align: center;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .9em;
  cursor: pointer;
  background: transparent url(../img/svg/glyph-settings-16x16.svg) no-repeat center center;
  background-size: contain;
  width: 12px;
  height: 12px;
}

.footer .button-settings {
  margin-top: 17px; /* used to align the gear icon with the availability dropdown menu inner text */
  opacity: .6;      /* used to "grey" the icon a little */
}

.settings-menu .dropdown-menu {
  /* The panel can't have dropdown menu overflowing its iframe boudaries;
     let's anchor it from the bottom-right, while resetting the top & left values
     set by .dropdown-menu */
  top: auto;
  left: auto;
  bottom: -8px;
  right: 14px;
}

.settings-menu .icon {
  display: inline-block;
  background-size: contain;
  width: 12px;
  height: 12px;
  margin-right: 1em;
}

.settings-menu .icon-settings {
  background: transparent url(../img/svg/glyph-settings-16x16.svg) no-repeat center center;
}

.settings-menu .icon-account {
  background: transparent url(../img/svg/glyph-account-16x16.svg) no-repeat center center;
}

.settings-menu .icon-signin {
  background: transparent url(../img/svg/glyph-signin-16x16.svg) no-repeat center center;
}

.settings-menu .icon-signout {
  background: transparent url(../img/svg/glyph-signout-16x16.svg) no-repeat center center;
}

/* Footer */

.footer {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-content: stretch;
  align-items: flex-start;
  font-size: 1em;
  border-top: 1px solid #D1D1D1;
  background-color: #eaeaea;
  color: #7f7f7f;
  padding: 14px;
}
